/**
 * Licensed under the Apache License Version 2.0.
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package net.interknit.knitter.fw.init;

import javax.servlet.ServletConfig;

import net.interknit.knitter.fw.ServiceDelegate;

import org.apache.cxf.Bus;

/**
 * Provides the default implementation of ServerInitializer interface.
 */
public class DefaultInitializer implements ServerInitializer
{
	@Override
	public void initialize(Bus bus, ServletConfig servletConfig, ServiceDelegate delegate)
	{
		String name = null;

		if(servletConfig != null)
			name = "servlet " + servletConfig.getServletName();
		else if(delegate != null)
			name = "service " + delegate.getClass().getName();

		System.out.println("Interknit: DefaultInitializer used for " + name);
	}
}
